package com.code.day15;

public class Day15ThreadText {
    public static void main(String[] args) throws InterruptedException {
        Day15Thread1 t1 = new Day15Thread1();
        //t.run();
        t1.setName("刘大胆");
        Day15Thread2 t2 = new Day15Thread2();
        t2.setName("超级刘大胆");

        //设置t2为守护线程
        t2.setDaemon( true);

        t1.start();//开启线程,jvm自动执行run方法
        t2.start();

    }
}
